package com.name.mvc._template.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.name.mvc._template.model._template;
import com.name.mvc._template.service.impl._templateServiceImpl;

@Controller
@RequestMapping("/_template")
public class _templateController {
	
	@Resource
	private _templateServiceImpl _templateService;
	
	@ResponseBody
	@RequestMapping("/_templateMsg")
	public String _templateMsg(HttpServletRequest request){
		String username = request.getParameter("username");
		String password = request.getParameter("password");
		System.out.println(username);
		System.out.println(password);
		_template template = _templateService.get_templateById(1);
		return "template:"+template;
	}
}
